package com.flashcash.solu.harvester.collectin;

import android.Manifest;
import android.content.Context;

import com.flashcash.solu.R;

public class PermissionUtil {

    public static final String[] neededPermissions = {
//            Manifest.permission.READ_CONTACTS,//读取联系人，在需要读取的时候才请求权限
//            Manifest.permission.READ_CALL_LOG,
//            Manifest.permission.READ_SMS,
            Manifest.permission.ACCESS_FINE_LOCATION,//卫星定位
            Manifest.permission.ACCESS_COARSE_LOCATION,//粗精度定位
            Manifest.permission.READ_PHONE_STATE,
            Manifest.permission.WRITE_EXTERNAL_STORAGE

    };

    public static final String getPermisinssionDesc(Context ctx, int index){
        if(ctx == null ){
            return "";
        }

        int[] descIndexes = new int[]{0,1,2,3};
        String[] desc = ctx.getResources().getStringArray(R.array.private_items);
        return desc[descIndexes[index]];
    }
}
